package com.ooono.factorytest.items;

import android.widget.TextView;

import com.ooono.factorytest.R;
import com.ooono.factorytest.base.BaseActivity;

import mcs8.mdm.PolicyManager;

/**
 * 光敏测试
 */
public class PhotosensitiveTestActivity extends BaseActivity {

    public static final String KEY = "photosensitive";

    private TextView photosensitiveTestValueTv;

    @Override
    public int getTestTitle() {
        return R.string.photosensitive_test_title;
    }

    @Override
    public String getTestKey() {
        return KEY;
    }

    @Override
    public int getContentLayout() {
        return R.layout.content_photosensitive_test;
    }

    @Override
    public void initViews() {
        photosensitiveTestValueTv = findViewById(R.id.tv_photosensitive_test_value);
        photosensitiveTestValueTv.setText(String.valueOf(PolicyManager.getPhotosensitive()));
    }

    @Override
    public void onStart() {
        super.onStart();

        mHandler.postDelayed(new Runnable() {
            @Override
            public void run() {
                photosensitiveTestValueTv.setText(String.valueOf(PolicyManager.getPhotosensitive()));
                mHandler.postDelayed(this, 1000);
            }
        }, 1000);
    }

    @Override
    public void onStop() {
        super.onStop();
    }
}
